<%@ page import="java.util.List" %>
<%@ page import="com.model.Project" %>
<%@ page import="com.model.Teacher" %><%--
  Created by IntelliJ IDEA.
  User: chaiyuan
  Date: 2017/5/9
  Time: 9:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar bar1"></span>
            <span class="icon-bar bar2"></span>
            <span class="icon-bar bar3"></span>
        </button>
        <a class="navbar-brand" href="#">选择学生</a>
    </div>
    <div class="collapse navbar-collapse">

        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="ti-user"></i>

                    <p>您好！${sessionScope.user.name}</p>
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="#">修改信息</a></li>
                    <li><a href="#">退出登录 </a></li>

                </ul>
            </li>

        </ul>

    </div>
</div>
</nav>
<div class="content">
    <div class="container-fluid">
<div class="row">
    <form action="/admin/addPeople" method="post">
    <div class="col-md-6">
        <div class="form-group">
            <label>课题</label>
            <select name="project">
                <%List<Project> pro  = (List<Project>) request.getAttribute("project_list");%>
                <%for(int i=0;i<pro.size();i++){%>
                <option value="<%=pro.get(i).getInt("id")%>"><%=pro.get(i).getStr("name")%></option>
                <%}%>
            </select>
        </div>
    </div>
    <div class="col-md-6">
        <div class="form-group">
            <label>委员会老师</label>
            <select name="teacher">
            <%List<Teacher> tea  = (List<Teacher>) request.getAttribute("teacher_list");%>
            <%for(int i=0;i<tea.size();i++){%>
            <option value="<%=tea.get(i).getInt("tea_id")%>"><%=tea.get(i).getStr("name")%></option>
            <%}%>
            </select>
        </div>
    </div>
        <div class="text-center">
            <button type="submit"  class="btn btn-info btn-fill btn-wd">确定</button>
        </div>
    </form>
</div>

    </div>
</div>
</body>
</html>
